import request from './request'

//分类创建
export function putHeroCreate(data) {
  return request({
    url: '/rest/heroes',
    method: 'post',
    data
  })
}

// 分类列表
export function getHeroList() {
  return request({
    url: '/rest/heroes',
    method: 'get',
  })
}

// 获取分类编辑数据
export function getHeroEditDetail(id) {
  return request({
    url: `/rest/heroes/${id}`,
    method: 'get',
  })
}

// 分类编辑
export function putHeroEdit(id,data) {
  return request({
    url: `/rest/heroes/${id}`,
    method: 'put',
    data
  })
}

// 分类列表删除
export function deleteHeroList(id) {
  return request({
    url: `/rest/heroes/${id}`,
    method: 'delete',
  })
}